package com.baiwei.vpnapi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;
/**
 * @program: vpnapi
 * @description: vpn连接
 * @author: Mr. Stone
 * @create: 2020-03-02 20:20
 **/

@TableName("connection")
@Data
public class VpnConnection {
    @TableId(value="connect_id", type= IdType.AUTO)
    private Integer connectId;
    private Integer userId;
    private Integer deviceId;
    private Integer serverId;
    private Integer allowipId;
    private Integer status;
    private String pubKey;
    private String privateKey;
    private String deviceIdentifier;
    private String serverIp;
    private String allowip;
    private Date createTime;
    private Date updateTime;
    private Integer isfree;

    public boolean isFree() {
        return isfree == 1;
    }
}
